From ea3579b0621f904465b8711e168c1e9cd88ec0be Mon Sep 17 00:00:00 2001 From: Peter Michael Green Date: Tue, 6 May 2025 10:42:52 +0000 Subject: [PATCH] Import rust-debcargo_2.7.8-4.debian.tar.xz [dgit import tarball rust-debcargo 2.7.8-4 rust-debcargo_2.7.8-4.debian.tar.xz] --- cargo-checksum.json | 1 + changelog | 296 ++++++++++++++++++ control | 112 +++++++ copyright | 44 +++ copyright.debcargo.hint | 58 ++++ debcargo.examples | 1 + debcargo.manpages | 1 + debcargo.toml | 7 + ...to-no-Multi-Arch-value-for-bin-packa.patch | 94 ++++++ ...control-make-Multi-Arch-configurable.patch | 73 +++++ patches/relax-git2.patch | 13 + patches/series | 3 + rules | 13 + rules.debcargo.hint | 6 + source/format | 1 + tests/control | 14 + watch | 4 + 17 files changed, 741 insertions(+) create mode 100644 cargo-checksum.json create mode 100644 changelog create mode 100644 control create mode 100644 copyright create mode 100644 copyright.debcargo.hint create mode 100644 debcargo.examples create mode 100644 debcargo.manpages create mode 100644 debcargo.toml create mode 100644 patches/0001-control-default-to-no-Multi-Arch-value-for-bin-packa.patch create mode 100644 patches/0002-control-make-Multi-Arch-configurable.patch create mode 100644 patches/relax-git2.patch create mode 100644 patches/series create mode 100755 rules create mode 100755 rules.debcargo.hint create mode 100644 source/format create mode 100644 tests/control create mode 100644 watch diff --git a/cargo-checksum.json b/cargo-checksum.json new file mode 100644 index 0000000..b5623be --- /dev/null +++ b/cargo-checksum.json @@ -0,0 +1 @@ +{"package":"Could not get crate checksum","files":{}} diff --git a/changelog b/changelog new file mode 100644 index 0000000..14aead5 --- /dev/null +++ b/changelog @@ -0,0 +1,296 @@ +rust-debcargo (2.7.8-4) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.7.8 from crates.io using debcargo 2.7.8 + + [ Fabian Grünbichler ] + * Package debcargo 2.7.8 from crates.io using debcargo 2.7.8 + * Default no M-A value for bin packages (Closes: #1103920) + * Change M-A to no annotation instead of allowed + + -- Peter Michael Green Tue, 06 May 2025 10:42:52 +0000 + +rust-debcargo (2.7.8-3) unstable; urgency=medium + + * Package debcargo 2.7.8 from crates.io using debcargo 2.7.8 + * Uplaod to unstable + + -- Fabian Grünbichler Fri, 04 Apr 2025 19:17:48 +0200 + +rust-debcargo (2.7.8-2) experimental; urgency=medium + + * Package debcargo 2.7.8 from crates.io using debcargo 2.7.8 + * relax git2 to allow libgit2 1.8 and 1.9 + + -- Fabian Grünbichler Mon, 17 Mar 2025 07:13:14 +0100 + +rust-debcargo (2.7.8-1) unstable; urgency=medium + + * Package debcargo 2.7.8 from crates.io using debcargo 2.7.7 + * add `debcargo deb-dependencies` (Closes: #1051501) + * split generated Build-Depends into -Arch and -Indep + * allow overriding Breaks, Replaces and Conflicts + * fix version ranges with + * add manpages (Closes: #971633) + + -- Fabian Grünbichler Fri, 07 Mar 2025 09:46:24 +0100 + +rust-debcargo (2.7.7-1) unstable; urgency=medium + + * Package debcargo 2.7.7 from crates.io using debcargo 2.7.6 + * Update to cargo 0.85 + * Version ranges are now encoded using bounds instead of a series of + alternative dependencies (Closes: #967954) + + -- Fabian Grünbichler Fri, 14 Feb 2025 23:04:09 +0100 + +rust-debcargo (2.7.6-4) unstable; urgency=medium + + * Team upload. + * Use parallel=4 in DEB_BUILD_OPTIONS with dh_auto_install for armhf. + + -- Sudip Mukherjee Tue, 14 Jan 2025 21:36:40 +0000 + +rust-debcargo (2.7.6-3) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.7.6 from crates.io using debcargo 2.7.6 + * Relax dependency on env-logger. + + -- Peter Michael Green Wed, 01 Jan 2025 12:27:58 +0000 + +rust-debcargo (2.7.6-2) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.7.6 from crates.io using debcargo 2.7.5 + * Bump env_logger dependency to v0.11 + + -- NoisyCoil Tue, 31 Dec 2024 13:26:51 +0100 + +rust-debcargo (2.7.6-1) unstable; urgency=medium + + * Package debcargo 2.7.6 from crates.io using debcargo 2.7.5 + + -- Fabian Grünbichler Sun, 29 Dec 2024 19:34:13 +0100 + +rust-debcargo (2.7.5-1) unstable; urgency=medium + + * Package debcargo 2.7.5 from crates.io using debcargo 2.7.5 + + -- Fabian Grünbichler Sun, 24 Nov 2024 16:27:54 +0100 + +rust-debcargo (2.7.4-1) unstable; urgency=medium + + * Package debcargo 2.7.4 from crates.io using debcargo 2.7.2 + + -- Fabian Grünbichler Mon, 11 Nov 2024 21:37:03 +0100 + +rust-debcargo (2.7.2-1) unstable; urgency=medium + + * Package debcargo 2.7.2 from crates.io using debcargo 2.7.1 + + -- Fabian Grünbichler Tue, 22 Oct 2024 19:29:39 +0200 + +rust-debcargo (2.7.1-2) unstable; urgency=medium + + * Package debcargo 2.7.1 from crates.io using debcargo 2.7.0 + * Update git2 to 0.19 / libgit2 to 1.8 + + -- Fabian Grünbichler Sat, 05 Oct 2024 16:42:49 +0200 + +rust-debcargo (2.7.1-1) unstable; urgency=medium + + * Package debcargo 2.7.1 from crates.io using debcargo 2.7.0 + * Update to cargo 0.81, itertools 0.13 + * Fix generated d/watch for pre-release versions + + -- Fabian Grünbichler Fri, 04 Oct 2024 19:15:12 +0200 + +rust-debcargo (2.7.0-1) unstable; urgency=medium + + * Package debcargo 2.7.0 from crates.io using debcargo 2.7.0 + * update to cargo 0.76 + * bump the standard version to 4.7.0 for generated source packages + * no longer warn about uncollapsed packages + * Also generate a 'Static-Built-Using' in addition to the 'X-Cargo-Built-Using' + * Add rustc to autopkgtest Depends of generated source packages + * Switch dh compat to 13 for generated source packages + + -- Fabian Grünbichler Fri, 20 Sep 2024 15:08:30 +0200 + +rust-debcargo (2.6.1-6) unstable; urgency=medium + + * Team upload. + * Update to cargo 0.76 + + -- Fabian Grünbichler Fri, 12 Jul 2024 20:19:43 +0200 + +rust-debcargo (2.6.1-5) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.6.1 from crates.io using debcargo 2.6.1 + * Relax dependencies on itertools and toml. + + -- Peter Michael Green Tue, 30 Jan 2024 16:30:42 +0000 + +rust-debcargo (2.6.1-4) unstable; urgency=medium + + * Team upload. + * Fix sparse access of crates.io + + -- Fabian Grünbichler Tue, 19 Dec 2023 09:26:56 +0100 + +rust-debcargo (2.6.1-3) unstable; urgency=medium + + * Team upload. + * Bump cargo dependency to 0.70 + + -- Fabian Grünbichler Fri, 15 Dec 2023 11:41:50 +0100 + +rust-debcargo (2.6.1-2) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.6.1 from crates.io using debcargo 2.6.1 + * Bump git2 dependency to 0.18 + + -- Peter Michael Green Sun, 03 Dec 2023 16:14:08 +0000 + +rust-debcargo (2.6.1-1) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.6.1 from crates.io using debcargo 2.6.0 + + -- Matthias Geiger Mon, 20 Nov 2023 15:54:01 +0100 + +rust-debcargo (2.6.0-3) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.6.0 from crates.io using debcargo 2.6.0 + * Add patch for env-logger 0.10 + + -- Matthias Geiger Thu, 10 Aug 2023 17:43:57 +0200 + +rust-debcargo (2.6.0-2) unstable; urgency=medium + + * Team upload. + * Rebuild debcargo 2.6.0 with cargo 0.66.0 + + -- Fabian Gruenbichler Thu, 12 Jan 2023 16:33:49 +0000 + +rust-debcargo (2.6.0-1) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.6.0 from crates.io using debcargo 2.5.0 + + -- Fabian Gruenbichler Wed, 16 Nov 2022 10:08:41 +0100 + +rust-debcargo (2.5.0-5) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.5.0 from crates.io using debcargo 2.5.0 + * Bump textwrap dependency. + + -- Peter Michael Green Sun, 30 Oct 2022 16:37:02 +0000 + +rust-debcargo (2.5.0-4) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.5.0 from crates.io using debcargo 2.5.0 + * Bump git2 dependency. + + -- Peter Michael Green Sat, 08 Oct 2022 04:27:58 +0000 + +rust-debcargo (2.5.0-3) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.5.0 from crates.io using debcargo 2.5.0 + * Update dependencies for new textwrap version in Debian. + + -- Peter Michael Green Mon, 14 Mar 2022 01:24:43 +0000 + +rust-debcargo (2.5.0-2) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.5.0 from crates.io using debcargo 2.5.0 + * Don't run the build-time tests on mips64el as they fail to link. + + -- Peter Michael Green Mon, 29 Nov 2021 11:57:39 +0000 + +rust-debcargo (2.5.0-1) unstable; urgency=medium + + * Package debcargo 2.5.0 from crates.io using debcargo 2.5.0 + + -- Ximin Luo Thu, 11 Nov 2021 13:35:58 +0000 + +rust-debcargo (2.4.4-1) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.4.4 from crates.io using debcargo 2.4.3 + * Adjust dependencies for versions currently in sid. + * Revert cargo 0.49 related changes until rust-cargo is + updated in Debian. + + -- Peter Michael Green Sat, 06 Feb 2021 18:12:33 +0000 + +rust-debcargo (2.4.3-3) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.4.3 from crates.io using debcargo 2.4.3 + * Bump dependency on git2 package, the old version is broken + with new libgit2 (Closes: 976658). + + -- Peter Michael Green Mon, 07 Dec 2020 05:21:57 +0000 + +rust-debcargo (2.4.3-2) unstable; urgency=medium + + * Team upload. + * Package debcargo 2.4.3 from crates.io using debcargo 2.4.2 + * Relax dependency on itertools + + -- Peter Michael Green Tue, 01 Sep 2020 13:47:42 +0000 + +rust-debcargo (2.4.3-1) unstable; urgency=medium + + * Package debcargo 2.4.3 from crates.io using debcargo 2.4.2 + + -- Ximin Luo Sat, 18 Apr 2020 20:52:06 +0100 + +rust-debcargo (2.4.2-1) unstable; urgency=medium + + * Package debcargo 2.4.2 from crates.io using debcargo 2.4.2 + + -- Ximin Luo Wed, 08 Jan 2020 21:54:13 +0000 + +rust-debcargo (2.4.1-1) unstable; urgency=medium + + * Package debcargo 2.4.1 from crates.io using debcargo 2.4.1 + * Closes: #945436, #945499, #945560, #947088. + + -- Ximin Luo Fri, 03 Jan 2020 01:19:34 +0000 + +rust-debcargo (2.4.0-1) unstable; urgency=medium + + * Package debcargo 2.4.0 from crates.io using debcargo 2.4.0 + (Closes: #931897) + + -- Ximin Luo Thu, 15 Aug 2019 19:07:57 -0700 + +rust-debcargo (2.2.10-1) unstable; urgency=medium + + * Package debcargo 2.2.10 from crates.io using debcargo 2.2.10 + + -- Ximin Luo Sun, 20 Jan 2019 23:25:15 -0800 + +rust-debcargo (2.2.9-2) unstable; urgency=medium + + * Package debcargo 2.2.9 from crates.io using debcargo 2.2.9 + * Add dependency on quilt. + * Install debcargo.toml.example as an example. + + -- Ximin Luo Thu, 29 Nov 2018 22:33:36 -0800 + +rust-debcargo (2.2.9-1) unstable; urgency=medium + + * Package debcargo 2.2.9 from crates.io using debcargo 2.2.9 + + -- Ximin Luo Wed, 14 Nov 2018 21:03:02 -0800 diff --git a/control b/control new file mode 100644 index 0000000..93b1d86 --- /dev/null +++ b/control @@ -0,0 +1,112 @@ +Source: rust-debcargo +Section: rust +Priority: optional +Build-Depends: debhelper-compat (= 13), + dh-sequence-cargo +Build-Depends-Arch: cargo:native, + rustc:native (>= 1.58), + libstd-rust-dev, + librust-ansi-term-0.12+default-dev, + librust-anyhow-1+default-dev, + librust-cargo-0.86+default-dev, + librust-cargo-util-0.2+default-dev (>= 0.2.14-~~), + librust-cargo-util-schemas-0.7+default-dev, + librust-chrono-0.4+default-dev (>= 0.4.31-~~), + librust-clap-4+cargo-dev (>= 4.5-~~), + librust-clap-4+default-dev (>= 4.5-~~), + librust-clap-4+derive-dev (>= 4.5-~~), + librust-clap-4+wrap-help-dev (>= 4.5-~~), + librust-clap-mangen-0.2+default-dev, + librust-env-logger-0.11+default-dev, + librust-filetime-0.2+default-dev, + librust-flate2-1+default-dev, + librust-git2+default-dev (<< 0.21-~~), + librust-git2+default-dev (>= 0.19-~~), + librust-glob-0.3+default-dev, + librust-itertools-0.13+default-dev, + librust-log-0.4+default-dev, + librust-regex-1+default-dev, + librust-semver-1+default-dev, + librust-serde-1+default-dev, + librust-serde-derive-1+default-dev, + librust-tar-0.4+default-dev, + librust-tempfile-3+default-dev, + librust-textwrap-0.16+default-dev, + librust-toml-0.8+default-dev, + librust-walkdir-2+default-dev +Maintainer: Debian Rust Maintainers +Uploaders: + Ximin Luo , + Fabian Grünbichler +Standards-Version: 4.7.0 +Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/debcargo] +Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/debcargo +Homepage: https://salsa.debian.org/rust-team/debcargo +X-Cargo-Crate: debcargo +Rules-Requires-Root: no + +Package: librust-debcargo-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-ansi-term-0.12+default-dev, + librust-anyhow-1+default-dev, + librust-cargo-0.86+default-dev, + librust-cargo-util-0.2+default-dev (>= 0.2.14-~~), + librust-cargo-util-schemas-0.7+default-dev, + librust-chrono-0.4+default-dev (>= 0.4.31-~~), + librust-clap-4+cargo-dev (>= 4.5-~~), + librust-clap-4+default-dev (>= 4.5-~~), + librust-clap-4+derive-dev (>= 4.5-~~), + librust-clap-4+wrap-help-dev (>= 4.5-~~), + librust-clap-mangen-0.2+default-dev, + librust-env-logger-0.11+default-dev, + librust-filetime-0.2+default-dev, + librust-flate2-1+default-dev, + librust-git2+default-dev (<< 0.21-~~), + librust-git2+default-dev (>= 0.19-~~), + librust-glob-0.3+default-dev, + librust-itertools-0.13+default-dev, + librust-log-0.4+default-dev, + librust-regex-1+default-dev, + librust-semver-1+default-dev, + librust-serde-1+default-dev, + librust-serde-derive-1+default-dev, + librust-tar-0.4+default-dev, + librust-tempfile-3+default-dev, + librust-textwrap-0.16+default-dev, + librust-toml-0.8+default-dev, + librust-walkdir-2+default-dev +Provides: + librust-debcargo+default-dev (= ${binary:Version}), + librust-debcargo-2-dev (= ${binary:Version}), + librust-debcargo-2+default-dev (= ${binary:Version}), + librust-debcargo-2.7-dev (= ${binary:Version}), + librust-debcargo-2.7+default-dev (= ${binary:Version}), + librust-debcargo-2.7.8-dev (= ${binary:Version}), + librust-debcargo-2.7.8+default-dev (= ${binary:Version}) +Description: Create a Debian package from a Cargo crate - Rust source code + Source code for Debianized Rust crate "debcargo" + +Package: debcargo +Architecture: any +Section: devel +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + ${cargo:Depends}, + quilt +Recommends: + ${cargo:Recommends}, + dh-cargo +Suggests: + ${cargo:Suggests} +Provides: + ${cargo:Provides} +Built-Using: ${cargo:Built-Using} +Static-Built-Using: ${cargo:Static-Built-Using} +Description: Create a Debian package from a Cargo crate + This package contains the following binaries built from the Rust crate + "debcargo": + - debcargo diff --git a/copyright b/copyright new file mode 100644 index 0000000..7a4eb71 --- /dev/null +++ b/copyright @@ -0,0 +1,44 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: debcargo +Upstream-Contact: + Josh Triplett + Ximin Luo + Vasudev Kamath +Source: https://salsa.debian.org/rust-team/debcargo + +Files: * +Copyright: + 2016 Josh Triplett + 2017-2018 Ximin Luo + 2017-2018 Vasudev Kamath + 2024 Fabian Grünbichler +License: MIT or Apache-2.0 + +Files: debian/* +Copyright: + 2018-2021 Debian Rust Maintainers + 2018 Ximin Luo +License: MIT or Apache-2.0 + +License: Apache-2.0 + Debian systems provide the Apache 2.0 license in + /usr/share/common-licenses/Apache-2.0 + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/copyright.debcargo.hint b/copyright.debcargo.hint new file mode 100644 index 0000000..1264fb9 --- /dev/null +++ b/copyright.debcargo.hint @@ -0,0 +1,58 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: debcargo +Upstream-Contact: + Josh Triplett + Ximin Luo + Vasudev Kamath + Fabian Grünbichler +Source: https://salsa.debian.org/rust-team/debcargo + +Files: * +Copyright: + FIXME (overlay) UNKNOWN-YEARS Josh Triplett + FIXME (overlay) UNKNOWN-YEARS Ximin Luo + FIXME (overlay) UNKNOWN-YEARS Vasudev Kamath + FIXME (overlay) UNKNOWN-YEARS Fabian Grünbichler +License: MIT or Apache-2.0 +Comment: + FIXME (overlay): Since upstream copyright years are not available in + Cargo.toml, they were extracted from the upstream Git repository. This may not + be correct information so you should review and fix this before uploading to + the archive. + +Files: src/debian/licenses/AGPL-3.0 +Copyright: 2007 Free Software Foundation, Inc. +License: UNKNOWN-LICENSE; FIXME (overlay) +Comment: + FIXME (overlay): These notices are extracted from files. Please review them + before uploading to the archive. + +Files: debian/* +Copyright: + 2018-2025 Debian Rust Maintainers + 2018-2025 Ximin Luo + 2018-2025 Fabian Grünbichler +License: MIT or Apache-2.0 + +License: Apache-2.0 + Debian systems provide the Apache 2.0 license in + /usr/share/common-licenses/Apache-2.0 + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/debcargo.examples b/debcargo.examples new file mode 100644 index 0000000..2bf9da9 --- /dev/null +++ b/debcargo.examples @@ -0,0 +1 @@ +debcargo.toml.example diff --git a/debcargo.manpages b/debcargo.manpages new file mode 100644 index 0000000..bf2a0eb --- /dev/null +++ b/debcargo.manpages @@ -0,0 +1 @@ +manpages/*.1 diff --git a/debcargo.toml b/debcargo.toml new file mode 100644 index 0000000..b2ea0ba --- /dev/null +++ b/debcargo.toml @@ -0,0 +1,7 @@ +overlay = "." +uploaders = ["Ximin Luo ", "Fabian Grünbichler "] + +[packages.bin] +section = "devel" +depends = ["quilt"] +recommends = ["dh-cargo"] diff --git a/patches/0001-control-default-to-no-Multi-Arch-value-for-bin-packa.patch b/patches/0001-control-default-to-no-Multi-Arch-value-for-bin-packa.patch new file mode 100644 index 0000000..d236b61 --- /dev/null +++ b/patches/0001-control-default-to-no-Multi-Arch-value-for-bin-packa.patch @@ -0,0 +1,94 @@ +From 2e74fa1763f83209c5a62c1b40477021ea71ce66 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= +Date: Wed, 23 Apr 2025 18:07:37 +0200 +Subject: [PATCH 1/2] control: default to no Multi-Arch value for 'bin' package +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +'allowed' should be the exception, not the default. + +Fixes: #1103920 + +Signed-off-by: Fabian Grünbichler +--- + src/debian/control.rs | 10 ++++++---- + src/debian/control/tests.rs | 6 +++--- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/src/debian/control.rs b/src/debian/control.rs +index c48147f..be745e7 100644 +--- a/src/debian/control.rs ++++ b/src/debian/control.rs +@@ -35,7 +35,7 @@ pub struct Source { + pub struct Package { + name: String, + arch: String, +- multi_arch: String, ++ multi_arch: Option, + section: Option, + depends: Vec, + recommends: Vec, +@@ -126,7 +126,9 @@ impl fmt::Display for Package { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + writeln!(f, "Package: {}", self.name)?; + writeln!(f, "Architecture: {}", self.arch)?; +- writeln!(f, "Multi-Arch: {}", self.multi_arch)?; ++ if let Some(ref multi_arch) = self.multi_arch { ++ writeln!(f, "Multi-Arch: {}", multi_arch)?; ++ } + if let Some(section) = &self.section { + writeln!(f, "Section: {}", section)?; + } +@@ -452,7 +454,7 @@ impl Package { + // duplicate packages in the Debian archive. For very large crates we + // will eventually want to make debcargo generate -data packages that + // are arch:all and have the arch:any -dev packages depend on it. +- multi_arch: "same".to_string(), ++ multi_arch: Some("same".to_string()), + section: None, + depends, + recommends, +@@ -485,7 +487,7 @@ impl Package { + Package { + name, + arch: "any".to_string(), +- multi_arch: "allowed".to_string(), ++ multi_arch: None, + section: section.map(|s| s.to_string()), + depends: vec![ + "${misc:Depends}".to_string(), +diff --git a/src/debian/control/tests.rs b/src/debian/control/tests.rs +index bfad24b..f1d16cc 100644 +--- a/src/debian/control/tests.rs ++++ b/src/debian/control/tests.rs +@@ -136,7 +136,7 @@ fn test_package_new() { + assert!(instance.is_ok()); + let instance = instance.unwrap(); + assert_eq!("any", instance.arch); +- assert_eq!("same", instance.multi_arch); ++ assert_eq!(Some("same"), instance.multi_arch.as_deref()); + assert_eq!(None, instance.section); + assert_eq!(vec!["${misc:Depends}"], instance.depends); + assert_eq!(Vec::::new(), instance.recommends); +@@ -167,7 +167,7 @@ fn test_package_new_bin() { + let instance = Package::new_bin(basename, name_suffix, section, summary, description); + + assert_eq!("any", instance.arch); +- assert_eq!("allowed", instance.multi_arch); ++ assert_eq!(None, instance.multi_arch); + assert_eq!(Some("rust".to_owned()), instance.section); + assert_eq!( + vec!["${misc:Depends}", "${shlibs:Depends}", "${cargo:Depends}"], +@@ -201,7 +201,7 @@ fn test_package_display() { + ); + let instance = Package::new_bin(basename, name_suffix, section, summary, description); + +- let expected = "Package: rsa\nArchitecture: any\nMulti-Arch: allowed\nSection: rust\nDepends:\n ${misc:Depends},\n ${shlibs:Depends},\n ${cargo:Depends}\nRecommends:\n ${cargo:Recommends}\nSuggests:\n ${cargo:Suggests}\nProvides:\n ${cargo:Provides}\nBuilt-Using: ${cargo:Built-Using}\nStatic-Built-Using: ${cargo:Static-Built-Using}\nDescription: \n description_start\n .\n empty lines\n .\n description_stop\n"; ++ let expected = "Package: rsa\nArchitecture: any\nSection: rust\nDepends:\n ${misc:Depends},\n ${shlibs:Depends},\n ${cargo:Depends}\nRecommends:\n ${cargo:Recommends}\nSuggests:\n ${cargo:Suggests}\nProvides:\n ${cargo:Provides}\nBuilt-Using: ${cargo:Built-Using}\nStatic-Built-Using: ${cargo:Static-Built-Using}\nDescription: \n description_start\n .\n empty lines\n .\n description_stop\n"; + + assert_eq!(expected, instance.to_string()); + } +-- +2.49.0 + diff --git a/patches/0002-control-make-Multi-Arch-configurable.patch b/patches/0002-control-make-Multi-Arch-configurable.patch new file mode 100644 index 0000000..fae058f --- /dev/null +++ b/patches/0002-control-make-Multi-Arch-configurable.patch @@ -0,0 +1,73 @@ +From 6095199141afbc8de85c044015dd7e72262a71cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= +Date: Wed, 23 Apr 2025 18:18:51 +0200 +Subject: [PATCH 2/2] control: make Multi-Arch configurable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +to allow overriding if needed, without the need to override all of +debian/control. + +Signed-off-by: Fabian Grünbichler +--- + debcargo.toml.example | 4 ++++ + src/config.rs | 5 +++++ + src/debian/control.rs | 3 +++ + 3 files changed, 12 insertions(+) + +diff --git a/debcargo.toml.example b/debcargo.toml.example +index 862b6c2..da55db0 100644 +--- a/debcargo.toml.example ++++ b/debcargo.toml.example +@@ -196,6 +196,10 @@ uploaders = [ "foo bar " ] + #PLACEHOLDER + #""" + ++# Value for the Multi-Arch field of the package. If omitted, debcargo will ++# automatically set no value for 'bin', and 'same' for all 'lib' packages. ++#multi_arch = "no|same|foreign|allowed" ++ + # Additional Depends on top of the ones generated by debcargo. This should be + # used to pull in system libraries for crates that need them to build. You'll + # want the -dev versions of the library packages, since our crate packages are +diff --git a/src/config.rs b/src/config.rs +index 773d739..f445e53 100644 +--- a/src/config.rs ++++ b/src/config.rs +@@ -76,6 +76,7 @@ pub struct PackageOverride { + section: Option, + summary: Option, + description: Option, ++ multi_arch: Option, + depends: Option>, + recommends: Option>, + suggests: Option>, +@@ -219,6 +220,10 @@ impl Config { + self.with_package(key, |pkg| pkg.description.as_deref()) + } + ++ pub fn package_multi_arch(&self, key: PackageKey) -> Option<&str> { ++ self.with_package(key, |pkg| pkg.multi_arch.as_deref()) ++ } ++ + pub fn package_depends(&self, key: PackageKey) -> Option<&Vec> { + self.with_package(key, |pkg| pkg.depends.as_ref()) + } +diff --git a/src/debian/control.rs b/src/debian/control.rs +index be745e7..eb46d81 100644 +--- a/src/debian/control.rs ++++ b/src/debian/control.rs +@@ -589,6 +589,9 @@ impl Package { + .flatten() + .map(|s| s.to_string()), + ); ++ if let Some(multi_arch) = config.package_multi_arch(key) { ++ self.multi_arch = Some(multi_arch.to_owned()); ++ } + } + } + +-- +2.49.0 + diff --git a/patches/relax-git2.patch b/patches/relax-git2.patch new file mode 100644 index 0000000..209dac4 --- /dev/null +++ b/patches/relax-git2.patch @@ -0,0 +1,13 @@ +Index: debcargo/Cargo.toml +=================================================================== +--- debcargo.orig/Cargo.toml ++++ debcargo/Cargo.toml +@@ -90,7 +90,7 @@ version = "0.2" + version = "1" + + [dependencies.git2] +-version = "0.19" ++version = ">= 0.19, < 0.21" + + [dependencies.glob] + version = "0.3" diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..efeb113 --- /dev/null +++ b/patches/series @@ -0,0 +1,3 @@ +relax-git2.patch +0001-control-default-to-no-Multi-Arch-value-for-bin-packa.patch +0002-control-make-Multi-Arch-configurable.patch diff --git a/rules b/rules new file mode 100755 index 0000000..00e815c --- /dev/null +++ b/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +include /usr/share/dpkg/architecture.mk + +%: + dh $@ --buildsystem cargo + +override_dh_auto_test: +ifneq ($(DEB_HOST_ARCH),mips64el) + dh_auto_test -- test --all +endif + +override_dh_auto_install: + $(if $(findstring armhf,$(DEB_HOST_ARCH)), DEB_BUILD_OPTIONS="parallel=4 $(filter-out parallel=%,$(DEB_BUILD_OPTIONS))") dh_auto_install diff --git a/rules.debcargo.hint b/rules.debcargo.hint new file mode 100755 index 0000000..92c239b --- /dev/null +++ b/rules.debcargo.hint @@ -0,0 +1,6 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem cargo + +override_dh_auto_test: + dh_auto_test -- test --all diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/tests/control b/tests/control new file mode 100644 index 0000000..c8592a9 --- /dev/null +++ b/tests/control @@ -0,0 +1,14 @@ +Test-Command: /usr/share/cargo/bin/cargo-auto-test debcargo 2.7.8 --all-targets --all-features +Features: test-name=rust-debcargo:@ +Depends: dh-cargo (>= 31), rustc (>= 1.58), @ +Restrictions: allow-stderr, skip-not-installable + +Test-Command: /usr/share/cargo/bin/cargo-auto-test debcargo 2.7.8 --all-targets +Features: test-name=librust-debcargo-dev:default +Depends: dh-cargo (>= 31), rustc (>= 1.58), @ +Restrictions: allow-stderr, skip-not-installable + +Test-Command: /usr/share/cargo/bin/cargo-auto-test debcargo 2.7.8 --all-targets --no-default-features +Features: test-name=librust-debcargo-dev: +Depends: dh-cargo (>= 31), rustc (>= 1.58), @ +Restrictions: allow-stderr, skip-not-installable diff --git a/watch b/watch new file mode 100644 index 0000000..434a633 --- /dev/null +++ b/watch @@ -0,0 +1,4 @@ +version=4 +opts=filenamemangle=s/.*\/(.*)\/download/debcargo-$1\.tar\.gz/g,\ +uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\.?\d*)$/$1~$2/ \ +https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/debcargo .*/crates/debcargo/@ANY_VERSION@/download -- 2.30.2